<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.springside.modules.security.springsecurity.SpringSecurityUtils" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>角色管理 - <s:text name="context.title"/></title>
	<%@ include file="/common/meta.jsp" %>
	
</head>

<body>
<h1 class="title01"><img src="${ctx}/images/02_15.gif" width="45" height="42" class="fl"/><security:authorize ifAnyGranted="ROLE_修改角色">
			<a href="role!input.action">增加新角色</a>
		</security:authorize>角色管理 </h1>
	<div id="message"><s:actionmessage theme="custom" cssClass="success"/></div>


		<table id="contentTable" class="table_ys tableColor">
			<tr>
				<th>名称</th>
				<th>授权</th>
				<th>操作</th>
			</tr>

			<s:iterator value="allRoleList" var="v">
				<tr>
					<td nowrap="nowrap">${name}&nbsp;</td>
					<td >${authNames}&nbsp;</td>
					<td nowrap="nowrap">&nbsp;
						<security:authorize ifAnyGranted="ROLE_浏览角色">
							<security:authorize ifNotGranted="ROLE_修改角色">
								<a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="role!input.action?id=${id}">查看</a>&nbsp;
							</security:authorize>
						</security:authorize>

						<security:authorize ifAnyGranted="ROLE_修改角色">
						<s:if test="#v.name.indexOf('~#@') == -1">
							<a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="role!input.action?id=${id}" id="editLink-${name}">修改</a>&nbsp;
							<a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="role!delete.action?id=${id}" id="deleteLink-${name}" onClick="return confirm('确定删除？')">删除</a>
							</s:if>
						</security:authorize>
					&nbsp;</td>
				</tr>
			</s:iterator>
		</table>

	<div>
		
	</div>
</body>
</html>
